package com.yuyue.dronesystem.beans;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Plan
 */
public class Plan {

    private List<PlanItem> planList = new ArrayList<>();

    public Plan() {
    }

    public Plan(List<PlanItem> planList) {
        this.planList = planList;
    }

    public List<PlanItem> getPlanList() {
        return this.planList;
    }

    public void setPlanList(List<PlanItem> planList) {
        this.planList = planList;
    }

    public Plan planList(List<PlanItem> planList) {
        this.planList = planList;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof Plan)) {
            return false;
        }
        Plan plan = (Plan) o;
        return Objects.equals(planList, plan.planList);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(planList);
    }

    @Override
    public String toString() {
        return "{" +
            " planList='" + getPlanList() + "'" +
            "}";
    }
}